<template>
    <div>
        <div style="text-align:center;" class="common_br">
            <Alert show-icon closable>
                <span>{{this.dealerParams}}展业城市详情</span>
                <span slot="close">不再提示</span>
            </Alert>
        </div>
        <card>
            <div style="width:100%;overflow:hidden">
                <Row class="operation">
                    <Button @click="setAdopt('yes')" type="primary" icon="md-lock">已通过</Button>
                    <Button @click="setUnAdopt('no')" type="primary" icon="ios-unlock">未通过</Button>
                </Row>
                <Row>
                    <Form ref="searchForm" :model="searchForm" inline :label-width="100" class="search-form">
                        <Form-item label="城市" prop="channelType">
                            <Select v-model="searchForm.cityNo" clearable placeholder="请选择" style="width:200px">
                                <Option v-for="item in this.channelTypeList" :label="item.title" :value="item.value" :key="item.value">{{item.title}}</Option>
                            </Select>
                        </Form-item>
                    </Form>
                </Row>
                <Row>
                    <Table :loading="loading" border :columns="columns" :data="data" sortable="custom" @on-sort-change="changeSort" @on-selection-change="showSelect" ref="table">
                        <template slot-scope="{ row, index }" slot="channelType">
                            <span>{{setChannelTypeTitle(row.channelType)}}</span>
                        </template>
                        <template slot-scope="{ row, index }" slot="isFirstMortgage">
                            <span>{{setIsFirstMortgageTitle(row.isFirstMortgage)}}</span>
                        </template>
                    </Table>
                </Row>
                <Row type="flex" justify="end" class="page">
                    <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
                          @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]"
                          size="small" show-total show-elevator show-sizer></Page>
                </Row>
            </div>
        </card>
    </div>
</template>

<script>
    export default {
        name: "firstMortgageCity",
        props:{
            dealerParams:{
            }
        },
        data() {
            return {
                searchForm:{
                    cityNo:'',
                },
                columns:[
                    {
                        type: 'selection',
                        minWidth: 60,
                        maxWidth: 60,
                        align: 'center',
                        fixed: 'left'
                    },
                    {
                        title: '首单是否通过',
                        key: 'isFirstMortgage',
                        align: 'center',
                        minWidth: 100,
                        slot: "isFirstMortgage"
                    },
                    {
                        title: '渠道类型',
                        key: 'channelType',
                        align: 'center',
                        minWidth: 100,
                        slot: 'channelType'
                    },
                ],
                data:[],
                total:0,
            }
        },
        methods: {
            setAdopt(){},
            setUnAdopt(){},
            changeSort(e) {
            },
            showSelect(e) {
            },
            changePage(v) {
                this.searchForm.pageNumber = v
                this.getMortgageList()
                this.clearSelectAll()
            },
            changePageSize(v) {
                this.searchForm.pageSize = v
                this.getMortgageList()
            },

        },
    }
</script>

<style scoped>

</style>
